<?php
class photo_view extends SClass {

    public function process() {
        $user = $this->getUserSecure();
        if ($user) {
            if ($user->getLevel() >= 1) {
        	   $this->assign('autorized', 1);
            }
        }
       $post = ServiceUtils::GetFactory()->getGalleryService()->getPhotoByID($this->getArgument('id'));
            $a[] = array(
                'id' => $post->getId(),
                'albumid' => $post->getAlbumid(),
                'title' => $post->getTitle(),
                'image' => $post->getImage(),
                'comment' => $post->getComment(),
                'postdate' => $post->getPostdate(),
                'urledit' => Engine_LinkMaker::GetURLByContentID('gallery_photo_edit',
                    $post->getId()),
                'urldelete' => Engine_LinkMaker::GetURLByContentID('gallery_photo_delete',
                    $post->getId())
            );
        $this->assign('postArray', $a);
    }
  
}